package org.qiyu.live.id.generate.provider;


import jakarta.annotation.Resource;
import org.qiyu.live.id.generate.provider.service.IdGenerateService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class IdGenerateApplication implements CommandLineRunner {

    @Resource
    private IdGenerateService idGenerateService;

    public static void main(String[] args) {
        SpringApplication.run(IdGenerateApplication.class,args);
    }

    @Override
    public void run(String... args) throws Exception {
        for (int i = 0; i < 1000; i++) {
            Long seqId = idGenerateService.getUnSeqId(1);
            System.out.println(seqId);
        }
    }
}
